#include "cameralctrl.h"
#include"ProtocalIdentifier.h"
#include "NetworkCommonFunction.h"

CameralCtrl::CameralCtrl(int direction):
		SenderCommand(GetProtocalIdentifier("CameralControl")),
		m_Direction(direction)
{
}

void CameralCtrl::constructCommandData(QByteArray &commandData)
{
	unsigned long commandCode = m_CommandType;
	unsigned long commandLength;
	commandLength = sizeof(m_Direction);
	commandData.append(FBtoNetworkCharP(commandCode),4);
	commandData.append(FBtoNetworkCharP(commandLength),4);
	commandData.append(FBtoNetworkCharP(m_Direction), sizeof(m_Direction));
}
